﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}

@using (Html.BeginForm("Index", "DongCap", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-inline" }))
{
    <div id="wrapper">
        <div class="row">
            <h3 class="page-header">Cấu hình</h3>
        </div>
        <!-- /.row -->
        <div class="row">
            <div class="col-lg-12">
                <div class="panel-body">
                    <div class="dataTable_wrapper">
                        <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                            <thead>
                                <tr style="font-family:'Times New Roman'">
                                    <th>STT</th>
                                    <th>Commission</th>
                                    <th>Floor</th>
                                    <th>Optional</th>
                                </tr>
                            </thead>
                            <tbody style="font-family:'Times New Roman'">
                                @{ int j = 0;}
                                @foreach (var item in ViewBag.DongCap)
                                {
                                    j++;
                                    <tr>
                                        <td>@j</td>
                                        <td>@String.Format("{0:N}", item.Comission)</td>
                                        <td>@String.Format("{0:N}", item.Floor)</td>
                                        <td>
                                            <a href="@Url.Action("editDongCap", "DongCap", new { id = item.Id })">Edit</a>&nbsp;&nbsp;&nbsp;

                                        </td>
                                    </tr>
                                }
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        $(document).ready(function () {
            $('#dataTables-example').DataTable({
                responsive: true
            });
        });
        $('.Indedt').on('click', function () {
            return confirm('bạn có chắc chắn muốn xóa?');
        });
    </script>
}